<template>
	<view>
		<uni-popup ref="password" type="center">
			<view class="paypassword-view">
				<view class="f-s-28 color-333 f-w-b title">
					支付密码
				</view>
				<input type="text" v-model="password" placeholder="请输入密码" password="true"/>
				<view class="bottom-btn-box flex a-i-c f-s-30">
					<view class="item all-center btn1" @click="close(false)">
						取消
					</view>
					<view class="item all-center btn2" @click="close(true)">
						确定
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		name:"paypassword",
		data() {
			return {
				password:""
			};
		},
		methods:{
			close(isEnter){
				let that = this
				if(isEnter){
					that.$emit("enter",that.password)
				}else{
					that.$emit("close",false)
				}
				this.$refs.password.close()
				that.password = ""
			},
			show(){
				this.$refs.password.open()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.paypassword-view{
		width: 680upx;
		min-height: 80upx;
		border-radius: 20rpx;
		padding: 30upx 30upx;
		background: #FFFFFF;
		input{
			border-bottom: 2rpx solid #EFEFEF;
		}
		
		.title{
			margin-bottom: 30rpx;
		}
	}
	.bottom-btn-box{
		margin-top: 40rpx;
		.item{
			width: 272upx;
			height: 80upx;
			border-radius: 128upx;
		}
		.btn1{
			border: 2upx solid #979797;
			color: #979797;
			margin-right: 10upx;
		}
		.btn2{
			color: #FFFFFF;
			background: #2567F3;
		}
	}
</style>